<template>
  <div>
    <!-- 详细车籍查询 -->

    <TopFilter :list="topFilterList" :cols="3" @resetChange="resetChange" @filterChange="changeHandle" @onCollapse="collapseHandle" :labelWidth="110"></TopFilter>

    <Spin :spinning="exportLoading" tip="Loading...">
      <FilterTables
        ref="table"
        :isSelectColumn="false"
        columnsRef="zjVehicleRegistration"
        :columns="columns"
        :fetchapi="fetchApi"
        :params="fetchParams"
        :datakey="'records'"
        :onColumnsChange="(columns) => (this.columns = columns)"
      >
        <template slot="controls">
          <multiuse-button size="small" type="primary" :click="exportHandle">导 出</multiuse-button>
        </template>
      </FilterTables>

      <BaseDialog :visible.sync="visibledo" title="订单明细" destroyOnClose :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
        <DoModel :rowData="formData" @close="emitCloseHandler" />
      </BaseDialog>
      <BaseDialog :visible.sync="visibleshipment" title="货运单明细" destroyOnClose :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
        <ShipmentModel :rowData="formData" @close="emitCloseHandler1" />
      </BaseDialog>
    </Spin>
  </div>
</template>

<script>
import { dictionary } from '@/utils/dictMixin';

import { queryList, vehicleConfig, getWarehouseList, exportExcel, exporturl } from '@/api/omSaleP/HeadquartersInventory/VehicleRegistration';

import { exportExcelFile } from '@/utils/index';
import DoModel from './DoModel';
import ShipmentModel from './ShipmentModel';
import {
  getCarOEM,
  getBrandListOEM,
  getSeriesListOEM,
  getModelListOEM,
  getPackageListOEM,
  getOptionListDictOEM,
  getWcolorList,
  getIcolorList,
  addCar,
  updateCar,
  getCarExport,
  importCar,
  getExcelList,
  getExcelListV3,
} from '@/api/common/cars/masterDataCars';

export default {
  name: 'VehicleRegistration',

  mixins: [dictionary],

  data() {
    this.BaseTable = null;

    return {
      topFilterList: this.createdFrom(),

      columns: this.createdTable(),

      fetchApi: queryList,

      fetchParams: {
        xhrAbort: true,
      },

      exportLoading: false,
      visible: false,
    };
  },

  mounted() {
    this.BaseTable = this.$refs.table.$refs.pageTable;
  },

  created() {
    this.getList();

    this.vehicleInfo();
    this.getDictBrandList();
    this.getColors();
    this.getIColors();
  },

  methods: {
    resetChange(params) {
      this.topFilterList.find((item) => item.fieldName === 'seriesId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'seriesId').itemList = [];
      this.topFilterList.find((item) => item.fieldName === 'modelId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'modelId').itemList = [];
      this.topFilterList.find((item) => item.fieldName === 'packageId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'packageId').itemList = [];
      this.topFilterList.find((item) => item.fieldName === 'optionId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'optionId').itemList = [];
      const str = this.topFilterList.find((x) => x.fieldName == 'configId');

      this.$refs.TopFilter.RESET_FORM();
      this.fetchParams = Object.assign({}, this.fetchParams, params);
    },

    // 仓库名称

    async getList() {
      const res = await getWarehouseList();

      if (res.resultCode == 200) {
        res.data.list.map((x) => {
          this.topFilterList.find((item) => item.fieldName === 'subWarehouseId').itemList.push({ text: x.warehouseName, value: x.warehouseId });
        });
      }
    },

    // 车型选择

    async vehicleInfo() {
      let res = await vehicleConfig(0, { isUnlimited: 10041001 });

      this.topFilterList.find((item) => item.fieldName === 'vehicleInfo').itemList = res.data;
    },

    // 导出

    async exportHandle() {
      // let json = Object.assign({}, { CODE: 'CODE_0000045' }, this.fetchParams);

      // let res = await exporturl(json);

      // if (res.resultCode == 200) {

      //   this.$router.push('/admin/auth/oem/downloadCenter');

      // }

      await this.$confirm('是否将Excel表格保存至本地文件夹?', '提示', {
        confirmButtonText: '下载',

        cancelButtonText: '取消',

        type: 'warning',
      })

        .then(() => {
          this.exportLoading = true;

          exportExcel(this.fetchParams)
            .then((response) => {
              exportExcelFile(response.data, '详细车籍查询');

              this.exportLoading = false;
            })

            .catch((err) => {});
        })

        .catch(() => {
          this.$message({
            type: 'info',

            message: '已取消',
          });
        });
    },

    async getDictBrandList() {
      const res = await getBrandListOEM();
      if (res.resultCode === 200) {
        this.topFilterList.find((item) => item.fieldName === 'brandId').itemList = res.data.map((x) => ({ value: x.brandId, text: x.brandName }));
        // this.topFilterList = [...this.topFilterList]
      }
    },
    async changeBrandSelect(brandsid) {
      // if (!brandsid) {
      this.topFilterList.find((item) => item.fieldName === 'seriesId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'seriesId').itemList = [];
      this.topFilterList.find((item) => item.fieldName === 'modelId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'modelId').itemList = [];
      this.topFilterList.find((item) => item.fieldName === 'packageId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'packageId').itemList = [];
      this.topFilterList.find((item) => item.fieldName === 'optionId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'optionId').itemList = [];
      // } else {
      if (brandsid) {
        const res = await getSeriesListOEM(brandsid);
        if (res.resultCode === 200) {
          this.topFilterList.find((item) => item.fieldName === 'seriesId').itemList = res.data.map((x) => ({ value: x.seriesId, text: x.seriesName }));
        }
      }
    },
    async changeSeriesSelect(seriessid) {
      const brandsid = this.topFilterList.find((item) => item.fieldName === 'brandId').initialValue;
      this.topFilterList.find((item) => item.fieldName === 'modelId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'modelId').itemList = [];
      this.topFilterList.find((item) => item.fieldName === 'packageId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'packageId').itemList = [];
      this.topFilterList.find((item) => item.fieldName === 'optionId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'optionId').itemList = [];
      if (brandsid && seriessid) {
        const res = await getModelListOEM(brandsid, seriessid);
        if (res.resultCode === 200) {
          this.topFilterList.find((item) => item.fieldName === 'modelId').itemList = res.data.map((x) => ({ value: x.modelId, text: x.modelName }));
        }
      }
    },
    async changeModelSelect(modelId) {
      const brandsid = this.topFilterList.find((item) => item.fieldName === 'brandId').initialValue;
      const seriessid = this.topFilterList.find((item) => item.fieldName === 'seriesId').initialValue;
      // if (!brandsid || !seriessid || !modelId) {
      this.topFilterList.find((item) => item.fieldName === 'packageId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'packageId').itemList = [];
      this.topFilterList.find((item) => item.fieldName === 'optionId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'optionId').itemList = [];
      // } else {
      if (modelId) {
        const res = await getPackageListOEM(brandsid, seriessid, modelId);
        if (res.resultCode === 200) {
          this.topFilterList.find((item) => item.fieldName === 'packageId').itemList = res.data.map((x) => ({ value: x.packageId, text: x.configName }));
        }
      }
      // }
    },
    async changePackageSelect(packageId) {
      const brandsid = this.topFilterList.find((item) => item.fieldName === 'brandId').initialValue;
      const seriessid = this.topFilterList.find((item) => item.fieldName === 'seriesId').initialValue;
      // if (!brandsid || !seriessid || !modelId) {
      this.topFilterList.find((item) => item.fieldName === 'optionId').initialValue = '';
      this.topFilterList.find((item) => item.fieldName === 'optionId').itemList = [];
      // } else {
      if (packageId) {
        const res = await getOptionListDictOEM(packageId);
        if (res.resultCode === 200) {
          this.topFilterList.find((item) => item.fieldName === 'optionId').itemList = res.data.map((x) => ({ value: x.optionId, text: x.optionName }));
        }
      }
      // }
    },
    async getColors() {
      const res = await getWcolorList();
      if (res.resultCode === 200) {
        this.topFilterList.find((item) => item.fieldName === 'colorId').itemList = res.data.map((x) => ({ value: x.colorId, text: x.colorName }));
      }
    },
    async getIColors() {
      const res = await getIcolorList();
      if (res.resultCode === 200) {
        this.topFilterList.find((item) => item.fieldName === 'trimColorId').itemList = res.data.map((x) => ({ value: x.colorId, text: x.colorName }));
      }
    },
    shipmentHandle(row) {
      this.visibleshipment = true;
      this.formData = row;
    },
    doDetailHandle(row) {
      this.visibledo = true;
      this.formData = row;
    },
    emitCloseHandler() {},
    emitCloseHandler1() {},
    changeHandle(params) {
      this.fetchParams.xhrAbort = false;

      this.fetchParams = Object.assign({}, this.fetchParams, params);
    },

    collapseHandle() {
      this.$nextTick(() => {
        this.BaseTable.EXECUTE_RESET_HEIGHT();
      });
    },

    createdFrom() {
      return [
        {
          type: 'TEXT_AREA',
          label: 'VIN',
          fieldName: 'vin',
          placeholder: '请输入',
          maxlength: '',
          maxRows: 2,
        },
        {
          type: 'INPUT',
          label: '工厂库',
          fieldName: 'warehouseName',
          placeholder: '请输入',
        },
        // {
        //   type: 'SELECT',
        //   label: '仓库名称',
        //   fieldName: 'subWarehouseId',
        //   placeholder: '请选择',
        //   itemList: []
        // },
        {
          type: 'SELECT',
          label: '车辆状态',
          fieldName: 'vehicleStatus',
          placeholder: '请选择',
          itemList: this.createDictList('2113'),
        },
        // {
        //   type: 'INPUT_CASCADER',
        //   label: '车系名称',
        //   fieldName: 'vehicleInfo',
        //   placeholder: '请选择',
        //   options: { titles: ['品牌', '车系', '车型', '配置', '选装', '颜色'] },
        //   itemList: []
        // },
        {
          type: 'SELECT',
          label: '品牌',
          fieldName: 'brandId',
          placeholder: '请选择',
          itemList: [],
          change: (val) => {
            this.changeBrandSelect(val);
          },
        },
        {
          type: 'SELECT',
          label: '车系',
          fieldName: 'seriesId',
          placeholder: '请选择',
          itemList: [],
          change: (val) => {
            this.changeSeriesSelect(val);
          },
        },
        {
          type: 'SELECT',
          label: '车型',
          fieldName: 'modelId',
          placeholder: '请选择',
          itemList: [],
          change: (val) => {
            this.changeModelSelect(val);
          },
        },
        {
          type: 'SELECT',
          label: '配置',
          fieldName: 'packageId',
          placeholder: '请选择',
          itemList: [],
          change: (val) => {
            this.changePackageSelect(val);
          },
        },
        {
          type: 'SELECT',
          label: '选装',
          fieldName: 'optionId',
          placeholder: '请选择',
          itemList: [],
        },
        {
          type: 'SELECT',
          // type: 'INPUT',
          label: '外饰',
          // fieldName: 'colorStr',
          fieldName: 'colorId',
          placeholder: '请选择',
          itemList: [],
        },
        {
          type: 'SELECT',
          // type: 'INPUT',
          label: '内饰',
          fieldName: 'trimColorId',
          // fieldName: 'interiorColor',
          placeholder: '请选择',
          itemList: [],
        },
        // {
        //   type: 'INPUT',
        //   label: '产品代码',
        //   fieldName: 'productCode',
        //   placeholder: '请选择'
        // },
        // {
        //   type: 'INPUT',
        //   label: '产品名称',
        //   fieldName: 'productDesc',
        //   placeholder: '请选择'
        // },
        {
          type: 'INPUT',
          label: '物料编码',
          fieldName: 'productCode',
          placeholder: '请输入',
        },
        {
          type: 'INPUT',
          label: '物料描述',
          fieldName: 'productName',
          placeholder: '请输入',
        },
        // {
        //   type: 'SELECT',
        //   label: '是否锁定',
        //   fieldName: 'isLock',
        //   placeholder: '请选择',
        //   itemList: this.createDictList('1004')
        // },
        // {
        //   type: 'RANGE_DATE',
        //   label: '总部入库日期',
        //   fieldName: 'beginVehicleCreatedAt|endVehicleCreatedAt',
        //   placeholder: '请选择',
        //   initialValue: [],
        //   dateType: 'exactdaterange'
        // },
        // {
        //   type: 'SELECT',
        //   label: '订单占用',
        //   fieldName: 'matchFlag',
        //   placeholder: '请选择',
        //   itemList: this.createDictList('1004')
        // },
        // {
        //   type: 'SELECT',
        //   label: '批售退车标记',
        //   fieldName: 'returnFlag',
        //   placeholder: '请选择',
        //   itemList: this.createDictList('1004'),
        // },
        // {
        //   type: 'RANGE_DATE',
        //   label: '店端入库日期',
        //   fieldName: 'beginReceiveDate|endReceiveDate',
        //   placeholder: '请选择',
        //   initialValue: [],
        //   dateType: 'exactdaterange'
        // },
        // {
        //   type: 'RANGE_DATE',
        //   label: '实销日期',
        //   fieldName: 'beginCheckDate|endCheckDate',
        //   placeholder: '请选择',
        //   initialValue: [],
        //   dateType: 'exactdaterange'
        // },
        // {
        //   type: 'SELECT',
        //   label: '补贴状态',
        //   fieldName: 'applyStatus',
        //   placeholder: '请选择',
        //   itemList: [
        //     { text: '已上报', value: 10041001 },
        //     { text: '未上报', value: 10041002 }
        //   ]
        // },
        {
          type: 'INPUT',
          label: '公告号',
          fieldName: 'announceNo',
          placeholder: '请输入',
        },
        // {
        //   type: 'SELECT',
        //   label: '动力形式',
        //   fieldName: 'powerType',
        //   placeholder: '请选择',
        //   itemList: this.createDictList('6008')
        // },
        // {
        //   type: 'SELECT',
        //   label: '所属公司',
        //   fieldName: 'powerCompany',
        //   placeholder: '请选择',
        //   itemList: this.createDictList('6008')
        // },
      ];
    },

    createdTable() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 80,
          sorter: true,
          render: (props) => {
            return <span>{props.row.index + 1}</span>;
          },
        },
        {
          title: '品牌',
          dataIndex: 'brandName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '车系',
          dataIndex: 'seriesName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '车型',
          dataIndex: 'modelName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },

        {
          title: '配置',
          dataIndex: 'packageName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '公告号',
          dataIndex: 'announceNo',
          sorter: true,
          filter: true,
          align: 'center',
          width: 200,
          filterType: 'input',
        },
        {
          title: '选装',
          dataIndex: 'optionName',
          align: 'center',
          width: 250,
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '内饰',
          dataIndex: 'trimName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '外饰',
          dataIndex: 'colorName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '物料编码',
          dataIndex: 'productCode',
          sorter: true,
          filter: true,
          align: 'center',
          width: 200,
          filterType: 'input',
        },
        {
          title: '物料描述',
          dataIndex: 'productName',
          sorter: true,
          filter: true,
          align: 'center',
          width: 400,
          filterType: 'input',
        },
        {
          title: '市场指导价',
          dataIndex: 'basicPrice',
          sorter: true,
          filter: true,
          filterType: 'input',
          align: 'right',
          precision: 2,
          numberFormat: true,
        },
        {
          title: 'VIN',
          dataIndex: 'vin',
          align: 'center',
          width: 180,
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '车龄(天)',
          dataIndex: 'productDateAge',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '库龄(天)',
          dataIndex: 'postingDateAge',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '下线日期',
          dataIndex: 'productDate',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
        },
        {
          title: '入库日期',
          dataIndex: 'postingDate',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
        },
        {
          title: '出库日期',
          dataIndex: 'certificateDate',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
        },
        {
          title: '发运日期',
          dataIndex: 'startDeliveryDate',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
        },

        {
          title: '货运单号',
          dataIndex: 'shipmentOrderNo',
          sorter: true,
          filter: true,
          align: 'center',
          width: 200,
          filterType: 'input',
        },
        {
          title: '发动机号',
          dataIndex: 'engineNo',
          sorter: true,
          align: 'center',
          width: 200,
          filter: true,
          filterType: 'input',
        },

        {
          title: '合格证号',
          dataIndex: 'certificateNo',
          sorter: true,
          filter: true,
          align: 'center',
          width: 200,
          filterType: 'input',
        },

        {
          title: '电机号',
          dataIndex: 'motorNo',
          sorter: true,
          filter: true,
          align: 'center',
          width: 200,
          filterType: 'input',
        },
        {
          title: '电池号',
          dataIndex: 'batteryNo',
          sorter: true,
          filter: true,
          align: 'center',
          width: 200,
          filterType: 'input',
        },

        {
          title: '工厂库',
          dataIndex: 'warehouseName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '库位',
          dataIndex: 'subWarehouseName',
          width: 150,
          sorter: true,
        },
        {
          title: '车辆状态',
          dataIndex: 'vehicleStatus',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('2113'),
          render: (props) => {
            return <span>{this.createDictText(props.row.vehicleStatus, '2113')}</span>;
          },
        },
        {
          title: '车辆用途',
          dataIndex: 'vehicleUse',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('2102'),
          render: (props) => {
            return <span>{this.createDictText(props.row.vehicleUse, '2102')}</span>;
          },
        },
        {
          title: '结算经销商代码',
          dataIndex: 'dealerCodeForSettlement',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '结算经销商名称',
          dataIndex: 'dealerNameForSettlement',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '结算所属区域',
          dataIndex: 'areaNameForSettlement',
          sorter: true,
          filter: true,
          filterType: 'input',
        },{
          title: '结算省份',
          dataIndex: 'provinceNameForSettlement',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '结算城市',
          dataIndex: 'cityNameForSettlement',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '结算订单号', //批售订单号
          dataIndex: 'doNo',
          sorter: true,
          filter: true,
          filterType: 'input',
          align: 'center',
          width: 200,
        },
        {
          title: '订单提报日期',
          dataIndex: 'reportDate',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '订单类型',
          dataIndex: 'orderType',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('2105'),
          render: (props) => {
            return <span>{this.createDictText(props.row.orderType, '2105')}</span>;
          },
        },
        {
          title: '订单状态',
          dataIndex: 'orderStatus',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('2109'),
          render: (props) => {
            return <span>{this.createDictText(props.row.orderStatus, '2109')}</span>;
          },
        },
        {
          title: '结算价格',
          dataIndex: 'afterDiscountAmount',
          sorter: true,
          filter: true,
          filterType: 'input',
          align: 'right',
          precision: 2,
          numberFormat: true,
        },
        {
          title: '是否三方车辆',
          dataIndex: 'isTripartite',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('1004'),
          render: (props) => {
            return <span>{this.createDictText(props.row.isTripartite, '1004')}</span>;
          },
        },
        {
          title: '三方票号',
          dataIndex: 'billNo',
          sorter: true,
          filter: true,
          align: 'center',
          width: 200,
          filterType: 'input',
        },
        {
          title: '终端经销商名称',
          dataIndex: 'dealerNameForTerminal',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '终端所属区域',
          dataIndex: 'areaNameForTerminal',
          sorter: true,
          filter: true,
          filterType: 'input',
        },{
          title: '终端省份',
          dataIndex: 'provinceNameForTerminal',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '终端城市',
          dataIndex: 'cityNameForTerminal',
          sorter: true,
          filter: true,
          filterType: 'input',
        },


        {
          title: '零售订单号',
          dataIndex: 'soNo',
          sorter: true,
          filter: true,
          align: 'center',
          width: 200,
          filterType: 'input',
        },
        {
          title: '客户姓名',
          dataIndex: 'customerName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '客户联系方式',
          dataIndex: 'customerMobile',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '证件类型',
          dataIndex: 'idTypeCode',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('2120'),
          render: (props) => {
            return <span>{this.createDictText(props.row.idTypeCode, '2120')}</span>;
          },
        },
        {
          title: '证件号码',
          dataIndex: 'idNumber',
          sorter: true,
          filter: true,
          filterType: 'input',
          align: 'center',
          width: 200,
        },
        {
          title: '省份',
          dataIndex: 'provinceName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '城市',
          dataIndex: 'cityName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '是否增换购',
          dataIndex: 'isReplace',
          sorter: true,
          filter: true,
          filterType: 'checkbox',
          filterItems: this.createDictList('1004'),
          render: (props) => {
            return <span>{this.createDictText(props.row.isReplace, '1004')}</span>;
          },
        },
        {
          title: '终端开票时间',
          dataIndex: 'drawTime',
          sorter: true,
          filter: true,
          filterType: 'input',
        },

        {
          title: '终端成交价',
          dataIndex: 'totalaMount',
          sorter: true,
          filter: true,
          filterType: 'input',
          align: 'right',
          precision: 2,
          numberFormat: true,
        },
        
        // {
        //   title: '批售退车标识',
        //   dataIndex: 'returnFlag',
        //   sorter: true,
        //   filter: true,
        //   filterType: 'checkbox',
        //   filterItems: this.createDictList('1004'),
        //   render: (props) => {
        //     return <span>{this.createDictText(props.row.returnFlag, '1004')}</span>;
        //   },
        // },
        
        {
          title: '店端入库日期',
          dataIndex: 'receiveDate',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
        },
        {
          title: '店端配车日期',
          dataIndex: 'matchDate',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
        },

        {
          title: '店端交车日期',
          dataIndex: 'handoverCarTime',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
        },
        {
          title: '首次实销上报日期',
          dataIndex: 'createdDate',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
        },
        {
          title: '上牌日期',
          dataIndex: 'licensePlateDate',
          sorter: true,
          filter: true,
          filterType: 'date-range',
          dateFormat: 'yyyy-MM-dd',
        },

        
      ];
    },
  },
};
</script>
